import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
} from '@nestjs/common';
import { ReaderService } from './reader.service';
import { Public } from '@/common/jwt/public.decorator';
@Controller({ path: 'reader', version: '1' })
export class ReaderController {
  constructor(private readonly readerService: ReaderService) {}
  @Get('getCatalogs')
  @Public()
  async getCatalogs(@Body() params) {
    return await this.readerService.getCatalogs(params);
  }
  @Post('searchBook')
  async searchBook(@Body() params) {
    return await this.readerService.searchBook(params);
  }
  @Post('getPage')
  async getPageContent(@Body() params) {
    return await this.readerService.getPageContent(params);
  }
}
